from django.test import TestCase

# Create your tests here.
import requests, pprint

payload = {
    'username': 'test',
    'pass': '123'
}

response = requests.post('http://localhost:8000/api/login',
                         data=payload)

pprint.pprint(response.json())
